<template>
  <div>
    <el-button type="primary" @click="showDialog">打开弹窗</el-button>

    //切记el-dialog部分不要写进el-button里面，写远一点

    <el-dialog :visible.sync="dialogVisible">
      <kaipai/>
    </el-dialog>
  </div>
</template>

<script>


import kaipai from './add.vue';
export default {
  data() {
    return {
      dialogVisible: false,
    };
  },
  components: {
    kaipai,
  },
  methods: {
    showDialog() {
      this.dialogVisible = true;
    },
  },
};
</script>
